<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >

    <ui:composition template="layout.xhtml">

        <ui:define name="corpo">

            <h:form id="corselo_form" acceptcharset="utf-8"> 
                <p:panel header="Cadastrar Cor Selo">
                      <p:messages id="msg"/>
                    <fieldset>
                        <legend>Dados Serviço do Selo</legend> 
                        <h:panelGrid columns="2"  border="0" styleClass="textAlignRight" columnClasses="textAlignRight"> 
                           <h:outputLabel value="Descricao: "/>
                           <p:inputText value="#{managerServicoSelo.servSelo.descricao}"
                                         id="descricao_servSelo"
                                         required="true" size="50" 
                                         requiredMessage="O campo nome deve ser preenchido "/>
                           
                            <h:outputLabel value="Cartório: "/>
                            <p:inputText value="#{managerServicoSelo.servSelo.cartorio}"
                                         id="descricao_servCartorio"
                                         />
                           
                            <h:outputLabel value="FermoJupi: "/>
                            <p:inputText value="#{managerServicoSelo.servSelo.fermoJupi}"
                                         id="descricao_servFermo"
                                         />
                            <h:outputLabel value="OAB: "/>
                            <p:inputText value="#{managerServicoSelo.servSelo.OAB}"
                                         id="descricao_servOAB"
                                         />
                        </h:panelGrid>
                    </fieldset>
                    <br/>
                    <center>
                        <p:commandButton id="id_submit"  icon="ui-icon-disk" value="ALTERAR" actionListener="#{managerServicoSelo.editar()}" update="@form" />
                    </center>
                </p:panel>   
                <p:blockUI block="id_submit" trigger="id_submit">  
                    CARREGANDO...<br />  
                    <p:graphicImage value="/media/img/ajax-loader.gif"/>  
                </p:blockUI>
                 <p:dialog modal="true" resizable="false"  widgetVar="dialog" width="250" height="50" header="Cadastrado com Sucesso" >
                    <h:outputLabel value="Deseja Editar mais Dados ?"/>
                    
                    <f:facet name="footer" >
                        <center>
                            <p:commandButton value="SIM" icon="ui-icon-circle-plus" actionListener="#dialog.hide();" update="@form" immediate="true"/>
                            <p:commandButton value="NÃO" icon="ui-icon-circle-close" actionListener="#{managerServicoSelo.indexServicoSelo()}" immediate="true"/>
                        </center>
                    </f:facet>
                </p:dialog> 
               

            </h:form>  

        </ui:define>


    </ui:composition> 

</html>
